﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data;

namespace MyBusiness
{
    public class UserInfoOperation
    {
        Database dbGloab = BasicOperate.CreateDataBase();

        /// <summary>
        /// 验证用户信息
        /// </summary>
        /// <param name="strUser"></param>
        /// <param name="strPass"></param>
        /// <returns></returns>
        public int ValideUser(string strUser,string strPass)
        {
            int nReturn = 0;
            string strSql = string.Format(@"select * from st_user where userid='{0}' and pass='{1}'", strUser,strPass);
            DataTable dtReturn = dbGloab.ExecuteDataSet(CommandType.Text, strSql).Tables[0];
            if (dtReturn.Rows.Count > 0)
            {
                nReturn = 1;
            }
            return nReturn;
        }
    }
}
